<!--<?php
print <<<EOT
-->
<div class="m"></div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="tr4"><td>
按状态查看：
  <input type="button" name="Submit5" value="查看所有" class="btn" onclick="window.location='$basename';"/>
  <input type="button" name="Submit5" value="正在转码" class="btn" onclick="window.location='$basename&videostate=2';"/>
  <input type="button" name="Submit5" value="等待转码" class="btn" onclick="window.location='$basename&videostate=0';"/>
  <input type="button" name="Submit5" value="转码成功" class="btn" onclick="window.location='$basename&videostate=1';"/>
  <input type="button" name="Submit5" value="转码失败" class="btn" onclick="window.location='$basename&videostate=3';"/>
  <input type="button" name="Submit5" value="转码超时" class="btn" onclick="window.location='$basename&videostate=4';"/>
  </td>
</tr>
</table>
</div>
<!--
EOT;
if(!$action){
print <<<EOT
-->
<form id="form1" name="USER" method="post" action="$basename$url_state">
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="head"><td colspan="8">转码服务监控  （共 $count 个视频内容）</td></tr>
<tr class="tr2">
  <td width="2%">&nbsp;</td>
  <td width="3%">状态</td>
  <td>文件ID</td>
  <td>文件名</td>
  <td>存储位置</td>
  <td>尝试次数</td>
  <td>大小</td>
  <td>&nbsp;</td>
</tr>
<!--
EOT;
foreach($videolist as $v){
$v[filename] = substrs($v[filename],50);
empty($v[filename]) && $v[filename] = 'N/A';
print <<<EOT
-->
<tr class="tr3">
  <td>
    <input type="checkbox" name="rids[]" value="$v[rid]" />  </td>
  <td>
<!--
EOT;
if($v[videostate] == 0){
print <<<EOT
-->
<img src="images/icon/wait.png" title="等待转码" align="absmiddle" />
<!--
EOT;
} elseif($v[videostate]== 1) {print <<<EOT
-->  
  <img src="images/admin/ok.png" title="转码成功" align="absmiddle" />
<!--
EOT;
} elseif($v[videostate]== 2) {print <<<EOT
-->  
  <img src="images/icon/wait.gif" title="正在转码" align="absmiddle" />
<!--
EOT;
} elseif($v[videostate]== 3) {print <<<EOT
-->  
  <img src="images/icon/notice.png" title="转码失败" align="absmiddle" />
<!--
EOT;
} elseif($v[videostate]== 4) {print <<<EOT
-->  
  <img src="images/icon/notice.png" title="转码超时" align="absmiddle" />
<!--
EOT;
}print <<<EOT
-->  </td>
  <td>$v[rid]</td>
  <td>$v[filename]</td>
  <td><span title="存储节点：{$serverdb[$v[serverid]][servername]}">$v[filepath]</span></td>
  <td>$v[retry] </td>
  <td>$v[size]</td>
  <td><a href="$basename&action=reset&rid=$v[rid]$url_state"><img src="images/admin/reset.png" align="absmiddle" alt="重新转码" /></a>  </td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="tr4"><td><input type="hidden" name="action" id="action" value="reset" />    
	<input type="hidden" name="page" value="{$_GET[page]}" />
    <input type="button" name="button2" id="button2" value="全选" class="btn" onclick="CheckAll(document.USER);" />
    <input type="submit" name="button" id="button" value="批量重置" class="btn" onclick="$('#action').val('muledit')" /></td>
    <td>$pages</td>
</tr></table>
</div>
</form>
<script language="javascript">
function mulDel()
{
	if(!confirm("您确认要删除这些用户吗？\\n\\n删除之后用户信息不可恢复！")) return false;
	$('#action').val('muldel');
	document.USER.submit();
}
</script>
<!--
EOT;
}
?>-->